package com.kalvan.admin.log;

import com.fasterxml.jackson.annotation.JsonValue;


/**
 * 操作类型定义
 * @author chenliang
 */

public enum LogType {
    /**
     * 操作类型
     */
    SELECT(0, "查询"),
    ADD(1, "添加"),
    DELETE(2, "删除"),
    EDIT(3, "修改"),
    IMPORT(4, "导入"),
    EXPORT(5, "导出"),
    AUDITING(6, "审核"),
    LOGIN(7, "登录"),
    REGISTER(8, "注册"),
    OTHER(9, "其它操作"),
    ;
    /**
     * 操作类型
     */
    private final int code;
    /**
     * 操作说明
     */
    private final String desc;

    LogType(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return this.code;
    }

    @JsonValue
    public String getDesc() {
        return this.desc;
    }

    @Override
    public String toString() {
        return this.desc;
    }


}
